package com.xiaoqi.springboot.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author Rookie Coder
 * @Description 测试@value注解
 * @Date
 **/
@Controller
public class ValueAnnoController {

    @Value("${school.name}")
    private String schoolname;

    @Value("${school.index}")
    private String schoolindex;

    @RequestMapping("/testValue")
    @ResponseBody
    public String resultValue(){
        return schoolname + schoolindex;
    }

}
